package scoder.store;

import scoder.factory.OtherIngredientFactory;
import scoder.factory.PizzaIngredientFactory;
import scoder.pizza.HenanPizza;
import scoder.pizza.Pizza;

public class SecondPizzaStore extends PizzaStore {
    @Override
    protected Pizza createPizza(String type) {
        PizzaIngredientFactory factory = new OtherIngredientFactory();

        Pizza pizza = null;

        switch (type) {
            case "Henan":
                pizza = new HenanPizza(factory);
                pizza.setName("OtherPizza");
                break;
            default:
                System.out.println("Sorry，" + type + " pizza 暂未加入肯德基豪华午餐");
                break;
        }

        return pizza;
    }
}
